package com.finstone.data.spider.eshop;

import java.util.List;

import com.finstone.data.spider.eshop.service.ISpiderService;

public class EShopSpiderService {

	private List<ISpiderService<?>> spiderServiceList;

	public void doSpider() {
		startSpider();
	}

	@SuppressWarnings("unchecked")
	private void startSpider() {
		((ISpiderService<String>) spiderServiceList.get(0)).putTask("http://s.lenovo.com.cn/?index=0&fromhomepage"); // 0:eShopPageService

		for (ISpiderService<?> spiderService : spiderServiceList) {
			spiderService.start();
		}

	}

	public void setSpiderServiceList(List<ISpiderService<?>> spiderServiceList) {
		this.spiderServiceList = spiderServiceList;
	}
}